package com.ftg.learn.rbac.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author Guobt
 * @since 2022-02-09
 */
@TableName("sys_permission")
@ApiModel(value = "Permission对象", description = "")
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("权限Id")
    @TableId(value = "pid", type = IdType.AUTO)
    private Long pid;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("子地址")
    private String action;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("上级Id")
    private Integer parentId;

    @ApiModelProperty("权限状态")
    @TableLogic
    private Byte pstatus;

    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("添加时间")
    private LocalDateTime createTime;

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }
    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }
    public Byte getPstatus() {
        return pstatus;
    }

    public void setPstatus(Byte pstatus) {
        this.pstatus = pstatus;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Permission{" +
            "pid=" + pid +
            ", title=" + title +
            ", action=" + action +
            ", icon=" + icon +
            ", parentId=" + parentId +
            ", pstatus=" + pstatus +
            ", updateTime=" + updateTime +
            ", createTime=" + createTime +
        "}";
    }
}
